{include file="header.html"}
<script type="text/javascript">
//<!CDATA[
$(function(){
    // multi-select mall_gcategory
    $('#gcategory').length>0 && gcategoryInit("gcategory");
});
//]]>
</script>
<div id="rightTop">
  <p>{$lang.goods}</p>
  <ul class="subnav">
    <li><!--{if $smarty.get.closed}--><a class="btn1" href="index.php?app=goods">{$lang.all_goods}</a><!--{else}--><span>{$lang.all_goods}</span><!--{/if}--></li>
    <li><!--{if $smarty.get.closed}--><span>{$lang.closed}</span><!--{else}--><a class="btn1" href="index.php?app=goods&amp;closed=1">{$lang.closed}</a><!--{/if}--></li>
  </ul>
</div>
<div class="mrightTop1 info">
  <div class="fontl">
    <form method="get">
      <input type="hidden" name="app" value="goods" />
      <!--{if $smarty.get.closed}-->
      <input type="hidden" name="closed" value="1" />
      <!--{/if}--> {$lang.goods_name}:
      <input class="queryInput" type="text" name="goods_name" value="{$smarty.get.goods_name|escape}" />
      {$lang.store_name}:
      <input class="queryInput" type="text" name="store_name" value="{$smarty.get.store_name|escape}" />
      {$lang.brand}:
      <input class="queryInput" type="text" name="brand" value="{$smarty.get.brand|escape}" />
      {$lang.times}:
      <input class="queryInput" type="text" name="times" style="width: 300px;" value="{$smarty.get.times|escape}" placeholder="请用逗号分隔年代"/>
      {$lang.international_code	}:
      <input class="queryInput" type="text"  style="width: 200px;" name="international_code" value="{$smarty.get.international_code|escape}" />
      {$lang.screen_label}:
      <input class="queryInput" type="text" name="screen_label" value="{$smarty.get.screen_label|escape}" />
      <br/>
      <span style="position: relative; top: 5px;">
          {$lang.gcategory}:
          <div id="gcategory" style="display:inline;">
            <input type="hidden" name="cate_id" value="0" class="mls_id" />
            <select class="querySelect">
              <option>{$lang.select_pls}</option>
              {html_options options=$gcategories}
            </select>
          </div>
         {$lang.stock}:
          <div id="storestock" style="display:inline;">
            <select class="querySelect" name="storestock_id">
              <option>{$lang.select_pls}</option>
              {html_options options=$storeStock selected=$storestock_id}
            </select>
          </div>
         心愿单:
          <div style="display:inline;">
            <select class="querySelect" name="wish_close">
              <option value="">是否选择心愿单</option>
              <option value="1" <!--{if $wish_close eq 1}-->selected<!--{/if}-->>是</option>
              <option value="2" <!--{if $wish_close eq 2}-->selected<!--{/if}-->>否</option>
            </select>
          </div>
        是否特卖:
          <div style="display:inline;">
            <select class="querySelect" name="sales">
              <option value="">请选择</option>
              <option value="1" <!--{if $sales eq 1}-->selected<!--{/if}-->>是</option>
              <option value="2" <!--{if $sales eq 2}-->selected<!--{/if}-->>否</option>
            </select>
          </div>
          商品状态:
          <div style="display:inline;">
            <select class="querySelect" name="closed">
              <option value="">选择商品状态</option>
              <option value="1" <!--{if $closed eq 1}-->selected<!--{/if}-->>下架</option>
              <option value="2" <!--{if $closed eq 2}-->selected<!--{/if}-->>上架</option>
            </select>
          </div>
          浏览数:<input class="queryInput2" type="number" value="{$query.views_from}" name="views_from" />
                至:<input class="queryInput2" type="number" value="{$query.views_to}" name="views_to" class="pick_date" />
          <input type="submit" class="formbtn" value="{$lang.query}" />
      <!--{if $smarty.get.cate_id or $query.goods_name or $query.store_name or $query.brand}-->
      <a class="formbtn1" href="index.php?app=goods<!--{if $query.closed}-->&amp;closed={$query.closed}<!--{/if}-->">{$lang.cancel_query}</a>
      <!--{/if}-->
      </span>
    </form>
  </div>
  <div class="fontr">{include file=page.top.html}</div>
</div>
<div class="tdare">
  <table width="100%" cellspacing="0" class="dataTable">
    <!--{if $goods_list}-->
    <tr class="tatr1">
      <td width="20px" class="firstCell"><input type="checkbox" class="checkall" /></td>
      <td width="15%"><span ectype="order_by" fieldname="goods_name">{$lang.goods_name}</span></td>
      <td class="10%"><span ectype="order_by" fieldname="default_image">{$lang.default_image}</span></td>
      <td><span ectype="order_by" fieldname="brand">{$lang.brand}</span></td>
      <td><span fieldname="screen_label">{$lang.screen_label}</span></td>
      <td><span fieldname="label">{$lang.label}</span></td>
      <td><span fieldname="discount">折扣</span></td>
      <td><span ectype="order_by" fieldname="cate_id">{$lang.gcategory}</span></td>
      <td><span fieldname="total_inventory">{$lang.total_inventory}</span></td>
      <td><span fieldname="wish_close">{$lang.wish_close}</span></td>
      <td><span fieldname="sales">是否特卖</span></td>
      <td><span fieldname="wish_close">{$lang.times}</span></td>
      <td class="table-center"><span ectype="order_by" fieldname="mall_recommended">{$lang.mall_recommended}</span></td>
      <td class="table-center"><span ectype="order_by" fieldname="mall_sort_order">{$lang.mall_sort_order}</span></td>
      <td class="table-center"><span ectype="order_by" fieldname="if_show">{$lang.if_show}</span></td>
      <!--<td class="table-center"><span ectype="order_by" fieldname="closed">{$lang.close}</span></td>-->
      <td><span ectype="order_by" fieldname="views">{$lang.views}</span></td>
      <td>{$lang.handler}</td>
    </tr>
    <!--{/if}-->
    <!--{foreach from=$goods_list item=goods}-->
    <tr class="tatr2">
      <td class="firstCell"><input type="checkbox" class="checkitem" value="{$goods.goods_id}"/></td>
      <td><span ectype="inline_edit" fieldname="goods_name" fieldid="{$goods.goods_id}" required="1" class="editable" title="{$lang.editable}">{$goods.goods_name|escape}</span></td>
      <td class="table-center"><img  height="100"  src="{$goods.default_image}" /></td>
      <td>{$goods.brand|escape}</td>
      <td width="100px;">{$goods.screen_label|escape}</td>
      <td width="100px;">{$goods.label|escape}</td>
      <td>{$goods.discount}折</td>
      <td>{$goods.cate_name}</td>
      <td>{$goods.total_inventory}</td>
      <td>
        <!--{if $goods.wish_close eq 1}-->
              是
        <!--{else}-->
              否
        <!--{/if}-->
      </td>
      <td>
        <!--{if $goods.goods_sales eq 1}-->
              是
        <!--{else}-->
              否
        <!--{/if}-->
      </td>
      <td>{$goods.times}</td>
      <td class="table-center">
        <!--{if $goods.mall_recommended}-->
        <img src="templates/style/images/positive_enabled.gif" ectype="inline_edit" fieldname="mall_recommended" fieldid="{$goods.goods_id}" fieldvalue="1" title="{$lang.editable}"/>
        <!--{else}-->
        <img src="templates/style/images/positive_disabled.gif" ectype="inline_edit" fieldname="mall_recommended" fieldid="{$goods.goods_id}" fieldvalue="0" title="{$lang.editable}"/>
        <!--{/if}-->
      </td>
      <td class="table-center">
        <span ectype="inline_edit" fieldname="mall_sort_order" fieldid="{$goods.goods_id}" required="1" class="editable" title="{$lang.editable}">{$goods.mall_sort_order|escape}</span>
      </td>

      <td class="table-center"><!-- {if $goods.closed} -->下架<!--{else}-->上架<!-- {/if} --></td>

      <td>{$goods.views|default:0}</td>
      <td>
        <!--<a target="_blank" href="{$site_url}/index.php?app=goods&amp;id={$goods.goods_id}">{$lang.view}</a> |-->
        <a href="index.php?app=goods&act=appletCode&id={$goods.goods_id}">小程序码</a>
        <!--<a href="javascript:;" onclick="return ceshi()">测试</a>-->
      </td>
    </tr>
    <!--{foreachelse}-->
    <tr class="no_data info">
      <td colspan="8">{$lang.no_data}</td>
    </tr>
    <!--{/foreach}-->
  </table>
  <!--{if $goods_list}-->
  <div id="dataFuncs">
    <div id="batchAction" class="left paddingT15"> <!--{if !$smarty.get.closed}-->
      <input class="formbtn batchButton" type="button" value="{$lang.recommend}" name="id" uri="index.php?app=goods&act=recommend&ret_page={$page_info.curr_page}" />
          &nbsp;&nbsp;<!--{/if}-->
      <input class="formbtn batchButton" type="button" value="{$lang.edit}" name="id" uri="index.php?app=goods&act=edit&ret_page={$page_info.curr_page}" />&nbsp;&nbsp;
      <input class="formbtn batchButton" type="button" value="{$lang.drop}" name="id" uri="index.php?app=goods&act=drop&ret_page={$page_info.curr_page}" presubmit="confirm('{$lang.drop_confirm}')" />
    </div>
    <div class="pageLinks">{include file=page.bottom.html}</div>
   <!--{/if}-->
  </div>
  <div class="clear"></div>
</div>
{include file="footer.html"}
<script>
  function ceshi(){
      window.open("http://www.cnblogs.com/liumengdie/","_blank");
  }
</script>